package org.chen.ctrip.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.chen.common.ctrip.crawler.CrawlRequest;
import org.chen.common.ctrip.crawler.CrawlResult;
import org.chen.common.ctrip.crawler.CrawlerExecutionResult;
import org.chen.common.ctrip.dto.AiProductResponse;
import org.chen.common.ctrip.dto.ProductCreateContentRequest;
import org.chen.common.ctrip.dto.ProductRequest;
import org.chen.common.ctrip.entity.Product;
import org.chen.common.result.ResultVO;

import java.util.List;

public interface ProductService extends IService<Product> {
    List<Product> crawlProducts(CrawlRequest crawlRequest);
    List<Product> getUnfetchedDetailProducts();
    Product fetchProductDetail(String productId);

    // 页数范围爬取方法
    CrawlerExecutionResult crawlProductsRange(String keyword, int startPage, int endPage, int pageSize, int days, String departureCity);

    // 单页爬取，返回统计结果
    CrawlResult crawlProductsWithResult(String keyword, int pageIndex, int pageSize, int days, String departureCity);

    Product updateProduct(ProductRequest productRequest);

    boolean deleteContentById(String id);

    AiProductResponse createContent(ProductCreateContentRequest productCreateContentRequest);

    Product getByIdAndLanguage(String id, String lang);

    void syncData();
}